<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8"/>
		<title>生管排配表</title>
		<meta name="viewport" content="width=device-width, initial-scale=1"/>
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>	
		<link rel="stylesheet" href="./4/lumen/bootstrap.css" media="screen"/>
		<link rel="stylesheet" href="./_assets/css/custom.min.css"/>
	</head>
<body>
	<div class="container">
		<form  action="plan_upload.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
			<legend>生管排配表</legend>
			<!-- <div class="form-group row"> -->
			  <!-- <label class="col-sm-2 col-form-label" for="inputDefault">報表編號:</label> -->
			  <!-- <div class="col-sm-2"> -->
				<!-- <input name="SE" value="TD180306001" class="form-control" id="SE" type="text"> -->
			  <!-- </div> -->
			  <!-- <label class="col-sm-2 col-form-label" for="inputDefault">工序:</label> -->
			  <!-- <div class="col-sm-2"> -->
				<!-- <select name="WP" class="form-control" id="WP" type="text"> -->
					<!-- <option value="GJ">固晶</option> -->
					<!-- <option value="HX">焊线</option> -->
					<!-- <option value="DJ">点胶</option> -->
					<!-- <option value="QG">切割</option> -->
					<!-- <option value="FG">分光</option> -->
					<!-- <option value="BD">编带</option> -->
				<!-- </select> -->
			  <!-- </div> -->
			  <!-- <div class="col-sm-2"> -->
				
			  <!-- </div> -->
			<!-- </div>	 -->
			
			<!-- <div class="form-group row"> -->
			  <!--label class="col-sm-2 col-form-label" for="inputDefault">產品類型:</label>
			  <div class="col-sm-2">
			  <input readonly=""  class="form-control"  id="sqty" type="text">
			  </div-->
			  
			<!-- </div> -->
			<div class="form-group row">
			  <label class="col-sm-2 col-form-label" for="inputDefault">日期:</label>
			  <div class="col-sm-2">
				<input id="DT" type="date" class="form-control" name="DT"/>
			  </div>
			  
			  <label class="col-sm-2 col-form-label" for="inputDefault">周別:</label>
			  <div class="col-sm-2">
				<input id="WK" type="week" class="form-control" name="WK"/>
			  </div>
			  
			  <label class="col-sm-2 col-form-label" for="inputDefault">班別:</label>
			  <div class="col-sm-2">
				  <input type="radio" class="form-check-input" name="CSA" id="optionsRadios1" value="A"/>
				  <label class="custom-control-label" for="customRadio1">A</label><br>
				  
				  <input type="radio" class="form-check-input" name="CSB" id="optionsRadios2" value="B"/>
				  <label class="custom-control-label" for="customRadio1">B</label>
			  </div>
			  
			</div>
			<div class="form-group row">
				<!-- <label class="col-sm-3 control-label" for="filebutton">請選擇排配表檔(CSV)</label> -->
				<!-- <div class="col-sm-3"> -->
					<!-- <input type="file" name="csv"  id="file" class="input-large"> -->
				<!-- </div>	 -->
				
				<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
				  請選擇排配表檔(CSV): <br />
				  <input name="csv" type="file" id="csv" />
				  <input type="submit" name="Submit" value="Submit" />
				</form>
				
				<div class="col-sm-2">
					<button type="submit"  class="btn btn-primary button-loading"id="Clearesqty" >保存</button>
				</div>
				
				<div class="col-sm-2">
					<button type="button"  class="btn btn-primary button-loading" id="Clearesqty" >提交</button>
				</div>
				<!-- <div class="col-sm-3"> -->
					<!-- <button type="submit" id="submit" name="Import" class="btn btn-primary button-loading" data-loading-text="Loading...">上傳</button> -->
				<!-- </div> -->
			</div>

			
			<!--div id="mytable"></div-->
		</form>
			<!--div class="form-group row">
			  <div class="col-sm-2">
			  </div>
			  <div class="col-sm-2">
			  </div>
			  <div class="col-sm-2">
			  </div>
			  <div class="col-sm-2">
			  </div>
			  <div class="col-sm-2">
				<button type="button" id="Clearesqty" >保存</button>
			  </div>
			  <div class="col-sm-2">
				<button type="button" id="Clearesqty" >提交</button>
			  </div>
			</div>
			<div class="form-group row">
			</div-->
		
		<p class="lead">
			<a class="btn btn-primary btn-lg" href="index.html" role="button">返回</a>
		</p>
	</div>
	
	<link rel="stylesheet" type="text/css" href="./jexcel-master/dist/css/jquery.jexcel.css" />
    <script src="./_vendor/jquery/dist/jquery.min.js"></script>
	<script src="./jexcel-master/dist/js/jquery.jexcel.js"></script>
    <script src="./_vendor/popper.js/dist/umd/popper.min.js"></script>
    <script src="./_vendor/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="./_assets/js/custom.js"></script>
	
<script>
	//var DT = new Date;
	//var DTfmt = format("yyyy/MM/dd");
	//$("#DT").val(DTfmt);
	
	//var WK = getWeekOfYear(DT);
	//$("#WK").val(WK);
	
	<!-- $("#DT").change(function(){ -->
		<!-- var WK = getWeekOfYear($("#DT").val()); -->
		<!-- $("#WK").val(WK); -->
	<!-- }); -->
	
	data = [
    ['Google', 1998, 807.80],
    ['Apple', 1976, 116.52],
    ['Yahoo', 1994, 38.66],
	];
	
	$('#mytable').jexcel({ data:data,
		columns: [
				{ type:'text', wordWrap:true }
			],		
		colHeaders:['工单','机台号','產品型號','產品系列','計劃產能','排配工時'],
		colWidths: [ 100, 80, 100,100,100,100,100,100,100,100,100,100,100,100,100,100,50,50,50,50,50,50,50,50 ]			
					});
	<!-- colWidths: [ 100, 80, 100 ] -->
	
	//一天含 86,400,000 毫秒(24* 60 * 60*1000)    
	  
	//获取本周是一年中的第几周  
	function getWeekOfYear(date) {   
	    var d1 = date;  
	    var d2 = new Date(date.getFullYear(), 0, 1);  
	    var d = Math.round((d1 - d2) / 86400000);   
	    return Math.ceil((d + ((d2.getDay() + 1) - 1)) / 7);   
	};
	
	<!-- Date.prototype.format = function (fmt) {  -->
		<!-- var o = {  -->
			<!-- "M+" : this.getMonth()+1,                 //月份  -->
			<!-- "d+" : this.getDate(),                    //日  -->
			<!-- "h+" : this.getHours(),                   //小时  -->
			<!-- "m+" : this.getMinutes(),                 //分  -->
			<!-- "s+" : this.getSeconds(),                 //秒  -->
			<!-- "q+" : Math.floor((this.getMonth()+3)/3), //季度  -->
			<!-- "S"  : this.getMilliseconds()             //毫秒  -->
		<!-- };  -->
		<!-- if(/(y+)/.test(fmt)) { -->
			<!-- fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));  -->
		<!-- } -->
		<!-- for(var k in o) { -->
			<!-- if(new RegExp("("+ k +")").test(fmt)){ -->
				<!-- fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); -->
			<!-- } -->
		<!-- } -->
		<!-- return fmt;  -->
	<!-- }; -->
</script>
	
</body>
</html>
